package nc.ui.ar.noticear;

import java.util.Map;

import nc.ui.arap.service.IRemoteCallItem;
import nc.vo.arap.pub.QryConditionVO;
import nc.vo.arap.pub.StatValueObject;
import nc.vo.arap.service.ServiceVO;
import nc.vo.pub.BusinessException;

public class NoticeStatVOQueryCall implements IRemoteCallItem {

protected ServiceVO serviceVO=null;
	
	private String code;
	
	private NoticeArUI ui;
	
	private QryConditionVO conditionvo;
	
	NoticeStatVOQueryCall(QryConditionVO conditionvo, NoticeArUI ui) {
		this.conditionvo = conditionvo;
		this.ui = ui;
	}
	
	public ServiceVO getServiceVO() {
		if(serviceVO==null){
			serviceVO = new ServiceVO();
			serviceVO.setClassname("nc.itf.arap.prv.IArapAgeAnalysePrivate");
			serviceVO.setMethodname("queryNorticeAr");
			serviceVO.setParamtype(new Class[] {QryConditionVO.class});
			serviceVO.setParam(new Object[] {conditionvo});
			code = serviceVO.getCode();
		}
		return serviceVO;
	}

	public void handleResult(Map<String, Object> datas)
			throws BusinessException {
		StatValueObject[][] statVOs =(StatValueObject[][]) datas.get(code);
		ui.setStatValueObject(statVOs);
	}

}
